package com.yaodian100.ec.hourlyevent.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * 限时抢购
 * 
 * @author apple.chang
 * 
 */
// @Entity
@Table(name = "EC_HOURLY_EVENT")
public class HourlyEvent extends BaseEntity {

	private static final long serialVersionUID = -4692785154758953033L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_hourly_event")
	@SequenceGenerator(name = "seq_ec_hourly_event", sequenceName = "SEQ_EC_HOURLY_EVENT")
	@Column(name = "ID")
	private Long id;

	/**
	 * 上檔日期時間
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EVENT_DATE", nullable = false)
	private Date eventDate;

	/**
	 * 商品编号
	 */
	@Column(name = "PRODUCT_ID", length = 8, nullable = false)
	private String productId;

	/**
	 * 图片连结
	 */
	@Column(name = "IMG_URL", length = 100, nullable = false)
	private String imgUrl;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getEventDate() {
		return eventDate;
	}

	public void setEventDate(Date eventDate) {
		this.eventDate = eventDate;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
}